package com.core.service;

import com.core.domain.DTO.StadiumDTO;
import com.core.domain.Stadium;
import com.core.domain.User;
import com.core.domain.useStadium;
import org.apache.ibatis.annotations.Param;

import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author tmh
 * @date 2023/5/2 15:59
 * @description
 */
public interface TmhService {
    /**
     * 管理员查询所有用户
     * @return 所有用户
     */
    List<User> getListUsers();

    /**
     * 修改密码
     * @param id
     * @param newPassword
     */
    void modifyPassword(Integer id,String newPassword);

    User selectUserById(@Param("id") Integer id);

    String convertToCsvUsers(List<User> dataList);

    /**
     * 下载场地收入情况  --对应api：http://localhost:8080/stadium/djs/getTimeMoney
     *
     * @return
     * @throws UnsupportedEncodingException
     */
    String convertToCsvStadiumIncome(Map<String, Integer> map);

    String convertToCsvStadiumAndAge(List<Map<String, Object>> stadiumAndAgeList);

    String convertToCsvStadiumAndPopular(List<Map<String, Object>> stadiumAndPopularList);

    String convertToCsvStadiumUserNumbers(Map<String, Integer> useNumbers);

    String convertToCsvStadiumUtilizationRate(Map<String, String> stadiumUtilizationRate);

    String convertToCsvQueryStadium(HashMap<useStadium, Integer> information);

    String convertToCsvQueryStadiumByName(Stadium stadium);

    String convertToCsvQueryUserInfo(User user);

    String convertToCsvStadium(List<StadiumDTO> stadiumDTOList);
}
